package com.maomao.handler;

import javax.servlet.http.HttpServletRequest;

public class Chain {
	private Handler stu,tea,ta;
	public void createchain()
	{
		stu = new studentHandler();
		tea = new teacherHandler();
		ta = new taHandler();
		stu.setNextHandler(tea);
		tea.setNextHandler(ta);
	}
	
	public boolean reponse(HttpServletRequest request)
	{
		return stu.processRequest(request);
	}
	public boolean doIt(HttpServletRequest request)
	{
		createchain();
		return reponse(request);
	}
}
